package com.hl.sfzy.controller;

import com.hl.sfzy.entity.Firm;
import com.hl.sfzy.entity.Fm;
import com.hl.sfzy.entity.User;
import com.hl.sfzy.service.FirmService;
import com.hl.sfzy.service.FmService;
import com.hl.sfzy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName FirmController
 * @Description TODO
 * @Author Jerry
 * @Date 2024年01月15日 11:06
 * @Version 1.0
 */
@CrossOrigin
@RestController
@RequestMapping({"/firm"})
public class FirmController {
    @Autowired
    private FirmService FirmService;
    @PutMapping("/edit")
    public Result edit(@RequestBody Firm firm) {
        FirmService.edit(firm);
        return Result.success();
    }
    @GetMapping("/find/{id}")
    public Result findById(@PathVariable Integer id) {
        return Result.success(FirmService.findById(id));
    }
}
